<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" th:href="@{/css/layui.css}"  media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<blockquote class="layui-elem-quote"><h6><b></b> 来自 <span th:text="${target}" id="target-name" >落基山脉下的闲人</span> 的消息</h6></blockquote>

<ul>
    <li>
        <form th:action="@{/follow}" method="post">
            <input type="hidden" name="entityId" th:value="${target}">
            <button type="submit" class="layui-btn">关注他</button>
            <!--                                    <div class="invalid-feedback" th:text="${likeMsg}">-->
            <!--                                        密码不正确-->
            <!--                                    </div>-->
        </form>
    </li>
</ul>
<br>
<br>
<!-- 内容 -->
<div class="layui-elem-field layui-field-title">
    <div class="container">
        <!-- 私信列表 -->
        <ul class="list-unstyled mt-4">
<!--            遍历私信-->
            <li class="media pb-3 pt-3 mb-2" th:each="map:${letters}">
                <div class="toast show d-lg-block" role="alert" aria-live="assertive" aria-atomic="true">
                    <div class="toast-header">
<!--                        用户名-->
                        <strong class="mr-auto" th:utext="${map.fromUser.username}" style="padding-left: 10px">落基山脉下的闲人</strong>

<!--                        <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">-->
<!--                            <span aria-hidden="true">&times;</span>-->
<!--                        </button>-->
                    </div>
<!--                    //内容-->
                    <br>
                    <div style="width: border-box" class="layui-btn layui-btn-normal" th:utext="${map.letter.content}">
                        君不见, 黄河之水天上来, 奔流到海不复回!
                    </div>
                    <!--                        时间-->
                    <small style="padding-left: 1000px" th:text="${#dates.format(map.letter.createTime,'yyyy-MM-dd HH:mm:ss')}">2019-04-25 15:49:32</small>
                </div>
                <br>
                <br>
            </li>
            <br>
        </ul>
    </div>
</div>
    <br>
        <form class="layui-form" method="post" th:action="@{/vip/send}">
            <div class="layui-form-item layui-form-text" >
                <label class="layui-form-label">发送给</label>
                <input name="toName" type="hidden" th:value="${target}">
                <div class="layui-input-block">
                    <textarea th:placeholder="${target}" class="layui-textarea" style="width: 1000px" id="message-text" name="content"></textarea>
                </div>
            </div>
            <!--<div class="layui-form-item layui-form-text">
              <label class="layui-form-label">编辑器</label>
              <div class="layui-input-block">
                <textarea class="layui-textarea layui-hide" name="content" lay-verify="content" id="LAY_demo_editor"></textarea>
              </div>
            </div>-->
            <div class="layui-form-item" style="bottom: 10px">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1" id="sendBtn">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
<!--        提示框-->
        <div id="hintModal" tabindex="-1" role="dialog" aria-labelledby="hintModalLabel"
             aria-hidden="true">
            <div role="document">
                <div>
                    <div>
                        <h5 id="hintModalLabel">提示</h5>
                    </div>
                    <div id="hintBody">
                        发送完毕!
                    </div>
                </div>
            </div>
        </div>

        <script th:src="@{/layui.js}" charset="utf-8"></script>
        <!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
        <script th:src="@{/js/letter.js}"></script>
</body>
</html>